This invention relates to the field of graphical user interface (GUI) testing. In particular, it relates to GUI testing before the GUI being tested is complete.
Automated testing for GUIs is difficult because typically there is very little specification information available and GUIs are prone to repeated rapid change both during development and between software releases. Any automation of GUI based tests tends to be costly to develop and maintain, and thus marginal in cost effectiveness. Often the GUI development is gated by other components and interfaces so it is delivered late in the development cycle, limiting the testing time.
Automated GUI testing is currently done by recording steps taken by a user. These steps may include, for example, clicking links, buttons, etc. and entering data into entry fields, checkboxes, etc. Test tools record these steps, together with a record the individual elements (the “widgets”) of the pages under test that were interacted with.
A GUI page has a hierarchy of widgets reflecting the nested HTML (hypertext mark-up language) tags encrypting the page content. Typically, a page will contain hundreds of elements, many of them invisible to the user, in a complex hierarchy with, for example, frames, forms, tables, documents, labels, labels containing one another, checkboxes, links, entry fields, etc.
The widget details are normally stored by a GUI test replay tool in a map which can be used to display the hierarchy of elements and to find them on the page when scripts are replayed. The map is built during the recording process and once recorded is not expected to change.
Pages under test are often generated using development tools and this makes them complex, often having many extra invisible layers of nested tables, forms, etc. It also makes them prone to change. A page may be regenerated every time the developer works on it and the order and content may change beyond recognition, as far as automation software is concerned, with each regeneration.
Whenever any pages change the test tool's map must be regenerated or maintained. Often the changes make the re-mapping very difficult, i.e. where a link is swapped for a button, where labels are swapped to be under their controls instead of visa versa, and where the invisible hierarchy of frames, forms, tables, etc. containing the controls adds or loses layers. If the map cannot be maintained, recorded test scripts fail because they do not find the required controls to click, enter data in, etc.
The fact that recording is based on recorded widgets limits testing to being based on recordings of actions. It is not possible to use test tools that create scripts using widgets without first interacting with the widgets to record them in a map. This effectively prevents testers from recording scripts until sample pages are available from development.
Maintaining large collections of test cases becomes very difficult in practice due to the problems of maintaining the mapping of widgets on the page. It is often quicker to re-record test scripts rather than to try to maintain them. Given hundreds or even thousands of test scripts, the effort involved in maintenance can become a serious limitation on GUI testing. Often GUI's tests are automated to a very limited extent because of the problems of maintenance.
It is an aim of the present invention to create and maintain a model of the contents of a GUI, without access to the GUI in question.